package com.caishi.lkx.order.service;

import com.zzw.common.entity.BaseService;
import com.caishi.lkx.order.model.OrderDetailModel;
import com.caishi.lkx.order.model.OrderModel;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author by keray
 * date:2021/5/14 2:35 下午
 */
public interface IOrderDetailService extends BaseService<OrderDetailModel, Long> {
    /**
     * <p>
     * <h3>作者 keray</h3>
     * <h3>时间： 2019/9/9 9:56</h3>
     * 计算订单详情价格
     * </p>
     *
     * @param detailModel
     * @return <p> {@link BigDecimal} </p>
     * @throws
     */
    @NotNull
    long computePrice(@NotNull OrderModel orderModel, @NotNull OrderDetailModel detailModel);

    /**
     * <p>
     * <h3>作者 keray</h3>
     * <h3>时间： 2019/11/27 2:07 PM</h3>
     * 查询订单详情
     * </p>
     *
     * @param orderId
     * @return <p> {@link List < OrderDetailModel>} </p>
     * @throws
     */
    List<OrderDetailModel> selectOrderDetails(String orderId);

}
